package com.example.mybatis.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 号段信息表
 * </p>
 *
 * @author ihumors
 * @since 2022-10-10
 */
@TableName("id_segment")
@ApiModel(value = "IdSegment对象", description = "号段信息表")
public class IdSegment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自增主键")
    @TableId(value = "segment_id", type = IdType.AUTO)
    private Long segmentId;

    @ApiModelProperty("业务应用唯一标识ID")
    private Integer appId;

    @ApiModelProperty("开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同")
    private Long startId;

    @ApiModelProperty("当前最大id")
    private Long maxId;

    @ApiModelProperty("步长")
    private Integer step;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    public Long getSegmentId() {
        return segmentId;
    }

    public void setSegmentId(Long segmentId) {
        this.segmentId = segmentId;
    }
    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }
    public Long getStartId() {
        return startId;
    }

    public void setStartId(Long startId) {
        this.startId = startId;
    }
    public Long getMaxId() {
        return maxId;
    }

    public void setMaxId(Long maxId) {
        this.maxId = maxId;
    }
    public Integer getStep() {
        return step;
    }

    public void setStep(Integer step) {
        this.step = step;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "IdSegment{" +
            "segmentId=" + segmentId +
            ", appId=" + appId +
            ", startId=" + startId +
            ", maxId=" + maxId +
            ", step=" + step +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
        "}";
    }
}
